<!DOCTYPE html>
<html>
  <head>
    <title>表盘</title>
    <style type="text/css">
      .clock {
        width: 200px;
        height: 200px;
        background: linear-gradient(to bottom, #7d3f99, #d33f6a);
        border-radius: 50%;
        position: relative;
        margin: 20px auto;
      }
      .clock:before {
        content: "";
        width: 10px;
        height: 10px;
        background: white;
        border-radius: 50%;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-left: -5px;
        margin-top: -5px;
      }
      .hour {
        width: 2px;
        height: 60px;
        background: white;
        position: absolute;
        top: 20%;
        left: 50%;
        margin-left: 0px;
        margin-top: 0px;
        transform-origin: bottom center;
        transform: rotate(0deg);
        transition: all 0.05s linear;
      }
      .minute {
        width: 2px;
        height: 80px;
        background: white;
        position: absolute;
        top: 10%;
        left: 50%;
        margin-left: 0px;
        margin-top: 0px;
        transform-origin: bottom center;
        transform: rotate(0deg);
        transition: all 0.05s linear;
      }
      .second {
        width: 2px;
        height: 100px;
        background: white;
        position: absolute;
        top: 0%;
        left: 50%;
        margin-left: 0px;
        margin-top: 0px;
        transform-origin: bottom center;
        transform: rotate(0deg);
        transition: all 0.05s linear;
      }
    </style>
  </head>
  <body>
    <div class="clock">
      <div class="hour"></div>
      <div class="minute"></div>
      <div class="second"></div>
    </div>
    <script type="text/javascript">
      function clock() {
        var date = new Date();
        var hour = date.getHours() % 12;
        var minute = date.getMinutes();
        var second = date.getSeconds();
        var hourDeg = hour * 30 + minute * 0.5;
        var minuteDeg = minute * 6;
        var secondDeg = second * 6;
        document.querySelector(".hour").style.transform =
          "rotate(" + hourDeg + "deg)";
        document.querySelector(".minute").style.transform =
          "rotate(" + minuteDeg + "deg)";
        document.querySelector(".second").style.transform =
          "rotate(" + secondDeg + "deg)";
      }
      setInterval(clock, 1000);
    </script>
  </body>
</html>
```
